﻿@model zkdao.Host.RebateService.RebateSubmit
@using sharp_net;
@{
    ViewBag.Title = "提交折扣信息";
}
@section scripts{
    @Html.ScriptDoc("pagejs/submit.js")
    @Html.ScriptDoc("front_net/resource/wmd/wmd.js")
}
<h2>提交折扣信息</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "提交失败，请更正以下错误：")

    @Html.LabelFor(m => m.Title)
    @Html.TextBoxFor(m => m.Title)
    @Html.ValidationMessageFor(m => m.Title)
    
    @Html.LabelFor(m => m.ContentRich)
    @Html.ValidationMessageFor(m => m.ContentRich)
    <div id="wmd-button-bar"></div>
    <div class="fn-clear">
        @Html.TextAreaFor(m => m.ContentRich, new { id = "wmd-input", @class = "fn-left" })
        <div id="wmd-preview" class="fn-right"></div>
    </div>
    
    @Html.LabelFor(m => m.LinkUrl)
    @Html.TextBoxFor(m => m.LinkUrl);
    @Html.ValidationMessageFor(m => m.LinkUrl)
    
    @Html.LabelFor(m => m.HandPrice)
    @Html.TextBoxFor(m => m.HandPrice);
    @Html.ValidationMessageFor(m => m.HandPrice)
    
    @Html.LabelFor(m => m.StartTime)
    @Html.TextBoxFor(m => m.StartTime, new { @class = "txttime", @Value = DateTime.Now.ToString("yyyy-MM-dd") })
    @Html.ValidationMessageFor(m => m.StartTime)
    
    @Html.LabelFor(m => m.EndTime)
    @Html.TextBoxFor(m => m.EndTime, new { @class = "txttime", @Value = DateTime.Now.ToString("yyyy-MM-dd") })
    @Html.ValidationMessageFor(m => m.EndTime)

    <div class="mb10">
        <span class="fn-inbk w250">
            @Html.LabelFor(m => m.GoodsCategoryTags)
            @Html.DropDownListFor(m => m.GoodsCategoryTags, (IList<SelectListItem>)ViewBag.GoodsCategoryList, new { @class = "chosen_select w250", data_placeholder = "选择商品类型（可选项）", multiple = "" })
        </span>
        <span class="fn-inbk w250">
            @Html.LabelFor(m => m.DiscountSourceTags)
            @Html.DropDownListFor(m => m.DiscountSourceTags, (IList<SelectListItem>)ViewBag.DiscountSourceList, new { @class = "chosen_select w250", data_placeholder = "选择商家来源（可选项）", multiple = "" })
        </span>
        <span class="fn-inbk w250">
            @Html.LabelFor(m => m.DiscountPriceTags)
            @Html.DropDownListFor(m => m.DiscountPriceTags, (IList<SelectListItem>)ViewBag.DiscountPriceList, new { @class = "chosen_select w250", data_placeholder = "选择折扣特征（可选项）", multiple = "" })
        </span>
        <span class="fn-inbk w250">
            @Html.LabelFor(m => m.AreaLimitTags)
            @Html.DropDownListFor(m => m.AreaLimitTags, (IList<SelectListItem>)ViewBag.AreaLimitList, new { @class = "chosen_select w250", data_placeholder = "选择地区限制（可选项）", multiple = "" })
        </span>
    </div>
    
    @Html.LabelFor(m => m.ImageIDs)
    <div id="uploader">
        <p>你的浏览器不支持Flash，所以无法上传图片</p>
    </div>
    @Html.HiddenFor(m => m.ImageIDs)

    <p class="mt10">
        <button type="submit" class="btn submit">提交折扣信息<i class="icon-arrow-right ml5"></i></button>
    </p>
}